package bytebuffer;

import java.nio.ByteBuffer;

public class TestByteBuffer {
	public static void main(String[] args) {
		ByteBuffer b = ByteBuffer.allocate(100);
		b.putShort((short) 5019);
		b.putInt(123);
		b.putInt(111);
		b.putInt(1112);
		b.flip();			//指针移到0

		System.out.println(b.getShort());
		System.out.println(b.getInt());
		System.out.println(b.getInt());
		System.out.println(b.getInt());
	}
}
